<template>
	<view><menuBox :menuInfo="menuInfo"></menuBox></view>
</template>

<script>
import menuBox from '@/wxcomponents/commonLayout/menu';
import userMixins from '@/libs/userMixins.js';
export default {
	mixins: [userMixins],
	data() {
		return {
			menuInfo: {
				base: {
					menuProp: ['name']
				},
				list: []
			}
		};
	},
	onLoad() {
		let showStopCoruse = this.calMenuShow('教务主任身份');
		let showChangeCoruse = this.calMenuShow('普通老师身份');
		if (showStopCoruse && showChangeCoruse) {
			this.menuInfo.list = [
				{
					url: 'changeCoruse',
					name: '调课申请'
				},
				{
					url: 'changeTeacher',
					name: '代课申请'
				},
				{
					url: 'stopCoruse',
					name: '停课申请'
				}
			];
		}else if(showStopCoruse && !showChangeCoruse){
			this.menuInfo.list = [
				{
					url: 'stopCoruse',
					name: '停课申请'
				}
			];
		}else{
			this.menuInfo.list = [
				{
					url: 'changeCoruse',
					name: '调课申请'
				},
				{
					url: 'changeTeacher',
					name: '代课申请'
				}
			];
		}
	},
	components: {
		menuBox
	}
};
</script>

<style lang="scss" scoped></style>
